package Stream;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Date;

public class Test06_ObjectInputStream {

	public static void main(String[] args) {
		ObjectInputStream ois = null;
		try{
			ois = new ObjectInputStream(new FileInputStream("test.ser"));
			String str = (String)ois.readObject();
			Integer in = (Integer)ois.readObject();
			Date d = (Date)ois.readObject();
			System.out.println(str);
			System.out.println(in);
			System.out.println(d);
			ois.close();
			
		}catch(IOException ie){
			System.out.println(ie.getMessage());
		}catch(ClassNotFoundException ce){
			System.out.println(ce.getMessage());
		}

	}

}
